/*
 * ******************************************************************************
 *  * Copyright (c) Jerges A. Bello G. 2014. Reservado todos los derechos.
 *  *****************************************************************************
 */

package com.jabex.persistence.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import java.util.Date;
import java.util.List;

/**
 * Created by jaugusto on 28/10/14. *
 */
@Entity
@Table(name = "ADA_COMPANY")
public class Company extends Identity {
	@Column(name = "NAME", unique = false, nullable = false)
	private String name;
	@Column(name = "CIF", unique = false, nullable = false)
	private String cif;
	@Column(name = "DIRECTION_FISCAL", length = 12, unique = false, nullable = true)
	private String directionFiscal;
	@Column(name = "CODE_POSTAL", length = 12, unique = false, nullable = true)
	private int codePostal;
	@Column(name = "TELEPHONE", length = 50, unique = false, nullable = true)
	private String telephone;
	@OneToMany(fetch = FetchType.LAZY)
	private List<Business> businessList;
	@Column(name = "CREATE_DATE", unique = false, nullable = true)
	private Date createDate;
	@Column(name = "ACTIVE", unique = false, nullable = false)
	private Boolean isActive;
	@Column(name = "COUNTRY", unique = false, nullable = false)
	private String country;
	@OneToMany(fetch = FetchType.LAZY)
	private List<Provider> providerList;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCif() {
		return cif;
	}

	public void setCif(String cif) {
		this.cif = cif;
	}

	public String getDirectionFiscal() {
		return directionFiscal;
	}

	public void setDirectionFiscal(String directionFiscal) {
		this.directionFiscal = directionFiscal;
	}

	public int getCodePostal() {
		return codePostal;
	}

	public void setCodePostal(int codePostal) {
		this.codePostal = codePostal;
	}

	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	public List<Business> getBusinessList() {
		return businessList;
	}

	public void setBusinessList(List<Business> businessList) {
		this.businessList = businessList;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public Boolean getIsActive() {
		return isActive;
	}

	public void setIsActive(Boolean isActive) {
		this.isActive = isActive;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public List<Provider> getProviderList() {
		return providerList;
	}

	public void setProviderList(List<Provider> providerList) {
		this.providerList = providerList;
	}
}
